package cn.hf.mychat.constanst;

/**
 * 
 * @author Roskin
 *
 */
public class ByteUtils {
	/**
	 * 比较两个是否相等
	 * @param a
	 * @param b
	 * @return
	 */
	public static boolean slowEquals(byte[] a,byte[] b){
		if(a==null||b==null) return false;
		int diff = a.length ^ b.length;
		for(int i=0;i<a.length&&i<b.length;i++){
			diff |= a[i] ^ b[i]; 
		}
		return diff == 0;
	}
}
